package com.laoma.stockcenter.controller;

import com.laoma.ordercenter.common.CommonResponse;
import com.laoma.stockcenter.service.StockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: SpringCloudDemos
 * @description:
 * @author: 老马
 * @create: 2022-01-24 15:53
 **/
@RestController
@RequestMapping("/stock")
@Slf4j
public class StockController {
    @Resource
    private StockService stockService;

    @GetMapping("/reduct.json")
    public CommonResponse reduct(String productId) throws Exception {
        return this.stockService.reduct(productId);
    }

}
